/**
 * $Id$
 * @author mcanovas
 * @date   Feb 28, 2012 9:55:08 AM
 *
 * Copyright (C) 2012 Scytl Secure Electronic Voting SA
 *
 * All rights reserved.
 *
 */
package org.sk.gsync.app.spring;

import org.sk.gsync.app.DocumentList;
import org.sk.gsync.app.DocumentListException;
import org.sk.gsync.app.GoogleConnection;
import org.sk.gsync.app.synch.GoogleDocsHelper;
import org.sk.gsync.app.synch.GoogleDocsMapping;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.google.gdata.client.docs.DocsService;

@Configuration
public class GoogleDocsSpringConfig {

    @Bean(name = "docsService")
    public DocsService getDocsService() {
        return new DocsService("SKGSync");
    }

    @Bean(name = "googleConnection")
    public GoogleConnection getGoogleConnection() {
        return new GoogleConnection();
    }

    @Bean(name = "googleDocsHelper")
    public GoogleDocsHelper getGoogleDocsHelper() {
        return new GoogleDocsHelper();
    }

    @Bean(name = "googleDocsMapping")
    public GoogleDocsMapping getGoogleDocsMapping() {
        return new GoogleDocsMapping();
    }

    @Bean(name = "documentList")
    public DocumentList getDocumentList() throws DocumentListException {
        return new DocumentList("SKGSync");
    }

}
